﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Minimalized
{
    class PlayManager
    {
        //Fields
        //----------------
        Player _player;
        GameObjects.Translocator _transLoc;
        Level current_level;
        //----------------
        /// <summary>
        /// Standard konstruktor
        /// </summary>
        public PlayManager() 
        {
            _player = new Player(new Vector2(100,300));
            _transLoc = new GameObjects.Translocator(new Vector2(_player.rectangle.X, _player.rectangle.Y));
        }
        public void Update(GameTime gametime)
        {
            _player.Update(gametime);
            _transLoc.Update(new Vector2(_player.rectangle.X, _player.rectangle.Y), gametime);
        }
        public void Draw(SpriteBatch spritebatch) 
        {
            spritebatch.Begin();
            _player.Draw(spritebatch);
            _transLoc.Draw(spritebatch);
            spritebatch.End();
        }
    }
}
